﻿<!-- $Id: goods_list.htm 17126 2010-04-23 10:30:26Z liuhui $ -->
<!DOCTYPE html>
<html>
<head>
  <title>列表</title>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
  <link rel="stylesheet" href="../../css/bootstrap.min.css">
  <link rel="stylesheet" href="../../css/font-awesome.min.css">
  <link rel="stylesheet" href="../../plugins/jqgrid/ui.jqgrid-bootstrap.css">
  <link rel="stylesheet" href="../../plugins/ztree/css/metroStyle/metroStyle.css">
  <link rel="stylesheet" href="../../css/main.css">
  <script src="../../libs/jquery.min.js"></script>
  <script src="../../plugins/layer/layer.js"></script>
  <script src="../../libs/bootstrap.min.js"></script>
  <script src="../../libs/vue.min.js"></script>
  <script src="../../libs/vue-i18n.min.js"></script>
  <script src="../../plugins/jqgrid/grid.locale-cn.js"></script>
  <script src="../../plugins/jqgrid/jquery.jqGrid.min.js"></script>
  <script src="../../plugins/ztree/jquery.ztree.all.min.js"></script>
  <script src="../../js/common.js"></script>
</head>
<body>
<div id="rrapp" v-cloak>
  <div v-show="showList">
  	<div class="grid-btn">
	  	<!--<div class="form-group col-md-6">-->
  	 		<select name="cat_id" class="btn btn-default"><option value="0">所有分类</option>{$cat_list}</select>
   		<!-- 品牌 -->
    		<select name="brand_id" class="btn btn-default"><option value="0">所有品牌</option>{html_options options=$brand_list}</select>
    	<!-- 推荐 -->
    		<select name="intro_type" class="btn btn-default"><option value="0">全部</option>{html_options options=$intro_list selected=$smarty.get.intro_type}</select>
      	<!-- 供货商 -->
      	<select name="suppliers_id" class="btn btn-default"><option value="0">全部</option>{html_options options=$suppliers_list_name selected=$smarty.get.suppliers_id}</select>
    
      <!-- 上架 --> 
      	<select name="is_on_sale" class="btn btn-default"><option value=''>{$lang.intro_type}</option><option value="1">{$lang.on_sale}</option><option value="0">{$lang.not_on_sale}</option></select>
    	<!--{html_options options=$brand_list}</select>-->
		  <a class="btn btn-default" @click="query">{{ $t("lang.query") }}</a>
		</div>  
    <table id="jqGrid"></table>
    <div id="jqGridPager"></div>
  </div>
<!--<form method="post" action="" name="listForm" onsubmit="return confirmSubmit(this)">
<table cellpadding="3" cellspacing="1">
  <tr>
    <th>
      <input onclick='listTable.selectAll(this, "checkboxes")' type="checkbox" />
      <a href="javascript:listTable.sort('goods_id'); ">{$lang.record_id}</a>{$sort_goods_id}
    </th>
    <th><a href="javascript:listTable.sort('goods_name'); ">{$lang.goods_name}</a>{$sort_goods_name}</th>
    <th><a href="javascript:listTable.sort('goods_sn'); ">{$lang.goods_sn}</a>{$sort_goods_sn}</th>
    <th><a href="javascript:listTable.sort('shop_price'); ">{$lang.shop_price}</a>{$sort_shop_price}</th>
    <th><a href="javascript:listTable.sort('is_on_sale'); ">{$lang.is_on_sale}</a>{$sort_is_on_sale}</th>
    <th><a href="javascript:listTable.sort('is_best'); ">{$lang.is_best}</a>{$sort_is_best}</th>
    <th><a href="javascript:listTable.sort('is_new'); ">{$lang.is_new}</a>{$sort_is_new}</th>
    <th><a href="javascript:listTable.sort('is_hot'); ">{$lang.is_hot}</a>{$sort_is_hot}</th>
    <th><a href="javascript:listTable.sort('sort_order'); ">{$lang.sort_order}</a>{$sort_sort_order}</th>
    {if $use_storage}
    <th><a href="javascript:listTable.sort('goods_number'); ">{$lang.goods_number}</a>{$sort_goods_number}</th>
    {/if}
    <th><a href="javascript:listTable.sort('virtual_sales'); ">{$lang.virtual_sales}</a>{$sort_virtual_sales}</th>
    <th>{$lang.handler}</th>
  <tr>
  {foreach from=$goods_list item=goods}
  <tr>
    <td><input type="checkbox" name="checkboxes[]" value="{$goods.goods_id}" />{$goods.goods_id}</td>
    <td class="first-cell" style="{if $goods.is_promote}color:red;{/if}"><span onclick="listTable.edit(this, 'edit_goods_name', {$goods.goods_id})">{$goods.goods_name|escape:html}</span></td>
    <td><span onclick="listTable.edit(this, 'edit_goods_sn', {$goods.goods_id})">{$goods.goods_sn}</span></td>
    <td align="right"><span onclick="listTable.edit(this, 'edit_goods_price', {$goods.goods_id})">{$goods.shop_price}

    </span></td>
    <td align="center"><img src="images/{if $goods.is_on_sale}yes{else}no{/if}.gif" onclick="listTable.toggle(this, 'toggle_on_sale', {$goods.goods_id})" /></td>
    <td align="center"><img src="images/{if $goods.is_best}yes{else}no{/if}.gif" onclick="listTable.toggle(this, 'toggle_best', {$goods.goods_id})" /></td>
    <td align="center"><img src="images/{if $goods.is_new}yes{else}no{/if}.gif" onclick="listTable.toggle(this, 'toggle_new', {$goods.goods_id})" /></td>
    <td align="center"><img src="images/{if $goods.is_hot}yes{else}no{/if}.gif" onclick="listTable.toggle(this, 'toggle_hot', {$goods.goods_id})" /></td>
    <td align="center"><span onclick="listTable.edit(this, 'edit_sort_order', {$goods.goods_id})">{$goods.sort_order}</span></td>
    {if $use_storage}
    <td align="right"><span onclick="listTable.edit(this, 'edit_goods_number', {$goods.goods_id})">{$goods.goods_number}</span></td>
    {/if}
    <td align="center"><span onclick="listTable.edit(this, 'edit_virtual_sales', {$goods.goods_id})">{$goods.virtual_sales}</span></td>
    <td align="center">
      <a href="../goods.php?id={$goods.goods_id}" target="_blank" title="{$lang.view}"><img src="images/icon_view.gif" width="16" height="16" border="0" /></a>
      <a href="goods.php?act=edit&goods_id={$goods.goods_id}{if $code neq 'real_goods'}&extension_code={$code}{/if}" title="{$lang.edit}"><img src="images/icon_edit.gif" width="16" height="16" border="0" /></a>
      <a href="goods.php?act=copy&goods_id={$goods.goods_id}{if $code neq 'real_goods'}&extension_code={$code}{/if}" title="{$lang.copy}"><img src="images/icon_copy.gif" width="16" height="16" border="0" /></a>
      <a href="javascript:;" onclick="listTable.remove({$goods.goods_id}, '{$lang.trash_goods_confirm}')" title="{$lang.trash}"><img src="images/icon_trash.gif" width="16" height="16" border="0" /></a>
      {if $specifications[$goods.goods_type] neq ''}<a href="goods.php?act=product_list&goods_id={$goods.goods_id}" title="{$lang.item_list}"><img src="images/icon_docs.gif" width="16" height="16" border="0" /></a>{else}<img src="images/empty.gif" width="16" height="16" border="0" />{/if}
      {if $add_handler}
        |
        {foreach from=$add_handler item=handler}
        <a href="{$handler.url}&goods_id={$goods.goods_id}" title="{$handler.title}"><img src="images/{$handler.img}" width="16" height="16" border="0" /></a>
        {/foreach}
      {/if}
    </td>
  </tr>
  {foreachelse}
  <tr><td class="no-records" colspan="10">{$lang.no_records}</td></tr>
  {/foreach}
</table>
</form>
<!-- end goods list -->
</div>
<script src="../../lang/modules/goods/goods_lang.js"></script>
<script src="../../js/modules/goods/goods.js"></script>
</body>
</html>
